package m3f.interact;

import m3f.io.BinaryTransformer;
import m3f.io.MatrixReader;
import m3f.io.MatrixReaderFactory;

public class FileIndexing {
	
	public static void transform(String[] args){
		if(args.length < 3){
			System.out.println("Transform parameters: \n" +
					"\t1. Input Matrix File\n" +
					"\t2. Output Binary File");
			return;
		}
		BinaryTransformer t = new BinaryTransformer();
		t.transform(args[1], args[2], false);
		MatrixReader bmr = MatrixReaderFactory.newInstance(args[2], false);
		bmr.start(args[2]);
	}
	
	public static void randomCopy(String[] args){
		if(args.length < 3){
			System.out.println("Transform parameters: \n" +
					"\t1. Input Matrix File\n" +
					"\t2. Output Binary File");
			return;
		}
		BinaryTransformer t = new BinaryTransformer();
		t.randomizeCopy(args[1], args[2], System.currentTimeMillis(), false);
		MatrixReader bmr = MatrixReaderFactory.newInstance(args[2], false);
		bmr.start(args[2]);
		
	}

}
